#include <iostream>
#include <sys/select.h>
#include <sys/time.h>
#include <string.h>

#include "epollServer.hpp"
#include "Log.hpp"

// ./selectserver 8080
int main(int argc, char* argv[])
{
    if(argc!= 2)
    {
        std::cout << "Usage: " << argv[0] << " port" << std::endl;
        return 1;
    }
    uint16_t port = std::stoi(argv[1]);
    ENABLE_CONSOLE_LOG();
    
    std::unique_ptr<epollServer> server = std::make_unique<epollServer>(port);
    server->Init();
    server->Start();
    return 0;
}